import 'babel-polyfill' // 兼容ie8以上浏览器，zhanglognfei 2020.1.9
import Vue from 'vue'
import 'normalize.css/normalize.css' // A modern alternative to CSS resets
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import i18n from '@tapui/lang' // internationalization
import '@tapui/styles/common.scss'
import 'animate.css'
import App from './App'
import router from '@tapui/router'
import './router'
import store from '@tapui/store'
import '@tapui/router/merge'
import '@tapui/icons' // icon
import './icons' // icon
import '@tapui/permission' // permission control
import '@tapui/filter'
import '@tapui/directive'
import '@tapui/utils/topscomm'
import TapUI from 'tap-ui'
import './styles/main.scss'
import { setStore, getStore } from '@tapui/utils/store'
// import VideoPlayer from 'vue-video-player'
// import 'vue-video-player/src/custom-theme.css'
// import 'video.js/dist/video-js.css'
// import videojs from 'video.js' // videojs-contrib-hls/node_modules/video.js/dist
// window.videojs = videojs
// require('videojs-contrib-hls/dist/videojs-contrib-hls.js')
// Vue.use(VideoPlayer)
import 'video.js/dist/video-js.css'
import '@tapui/fonts/tap-icon/iconfont.css'
// 如果要使用cas登录，将此处改为2
store.dispatch('ChangeLoginType', 2)
// 如果要修改系统名称
store.dispatch('ChangeWebSite', {
  indexTitle: '会议管理系统',
  firstPage: {
    // 默认系统首页
    title: '首页',
    value: '/calendarIndex'
  }
})
store.dispatch('AddWhiteList', ['/boardroom/elecCard', '/newBridge', '/thirdDynamic'])
store.dispatch('setDisplayMode', 'projector')
let theme = store.getters.theme
if (store.getters.themeList.findIndex((m) => m.code === theme || m.mainColor === theme || m === theme) === -1) {
  store.dispatch('setTheme', '#0A6ED2')
}
Vue.use(ElementUI, {
  size: store.getters.size, // set element-ui default size
  i18n: (key, value) => i18n.t(key, value)
})
Vue.config.productionTip = false

TapUI.install(Vue)
import TlHelp from '@/components/common/help'
Vue.component(TlHelp.name, TlHelp)

import promptMessages from '@/components/common/promptMessages'
Vue.component(promptMessages.name, promptMessages)

new Vue({
  el: '#app',
  router,
  store,
  i18n,
  render: (h) => h(App)
})
